<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>旋转动画</title>
    <link rel="stylesheet" href="../libs/bootstrap/css/bootstrap.min.css">
    <style>
        .transition{
            width: 100px;
            height: 100px;
            background-color: #ff705e;
        }

        .panel:nth-child(1):hover .transition{
            transform: rotateX(360deg);
            transition: all 2s;
        }

        .panel:nth-child(2):hover .transition{
            transform: rotateY(360deg);
            transition: all 2s;
        }


        .panel:nth-child(3):hover .transition{
            transform: rotateZ(360deg);
            transition: all 2s;
        }

        .panel:nth-child(4) .transition{
            animation-name: xuanzhuan;
            animation-duration: 2s;
            animation-iteration-count: infinite;
            animation-timing-function: ease-out;
        }

        @keyframes xuanzhuan {
            0%{
                transform: rotate(0);
            }
            100%{
                transform: rotate(360deg);
            }
        }
    </style>
</head>
<body>
<div class="container">

    <div class="page-header">
        <h1>CSS旋转动画</h1>
    </div>

    <div>
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3>X轴翻转</h3>
            </div>
            <div class="panel-body">
                <div class="transition"></div>
            </div>
        </div>


        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3>Y轴翻转</h3>
            </div>
            <div class="panel-body">
                <div class="transition"></div>
            </div>
        </div>


        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3>Z轴翻转</h3>
            </div>
            <div class="panel-body">
                <div class="transition"></div>
            </div>
        </div>



        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3>旋转动画</h3>
            </div>
            <div class="panel-body">
                <div class="transition"></div>
            </div>
        </div>


    </div>
</div>
</body>
</html>